package scm;

import java.net.URI;
import java.awt.Desktop;
import javax.swing.*;

public class UrlOpener
{
    private String url;

    public UrlOpener(String url)
    {
        this.url = url;
        showURL();
    }

    private void showURL()
    {
        Desktop desktop = Desktop.getDesktop();
        try
        {
            URI uri = new URI( url);
            desktop.browse(uri);
        }
        catch ( Exception e )
        {
            JOptionPane.showMessageDialog(null, e.getMessage());
        }
    }
}
